<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>{$goods.client}-{$goods.qu}-{$goods.current_rank}-{$goods.target_rank}</title>
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <link href="__CDN__/assets/index/css/release_info.css" rel="stylesheet" type="text/css">
    <link href="__CDN__/assets/popup/css/animate.css" rel="stylesheet" type="text/css">
    <link href="__CDN__/assets/popup/css/noticejs.css" rel="stylesheet" type="text/css">
    <script src="__CDN__/assets/popup/js/notice.js"></script>
</head>
<body>
<section class="aui-flexView">
    <header class="aui-navBar aui-navBar-fixed b-line">
        <a href="javascript:history.go(-1)" class="aui-navBar-item">
            <i class="icon icon-return"></i>
        </a>
        <div class="aui-center">
            <span class="aui-center-title">王者荣耀代练详情</span>
        </div>
        <a href="javascript:;" class="aui-navBar-item">
            <i class="icon icon-more"></i>
        </a>
    </header>
    <section class="aui-scrollView">
        <div class="aui-flex">
            <div class="aui-flex-box">
                <h2>【{$goods.goods_type}】{$goods.current_rank} - {$goods.target_rank}
                    {if condition="$goods.mwgrade == 0"}
                    {else}
                    * 铭文{$goods.mwgrade}级
                    {/if}
                   </h2>
            </div>
            <div class="aui-right-text">
                <h2 style="color: #ff5100">￥{$goods.dl_price}</h2>
            </div>
        </div>
        <div class="aui-flex b-line" style="padding-top:0;">
            <div class="aui-flex-box">
                {if condition="$goods.status == 1"}
                <h3 style="color: #ff5100;">待接单</h3>
                {else}
                <h3 style="color: #009688;">代练中</h3>
                {/if}
            </div>
        </div>
        <div class="divHeight"></div>
        <div class="aui-flex b-line">
            <div class="aui-flex-box">
                <h3><span>订单编号：{$goods.order}</span></h3>
                <h3><span>代练客户端：{$goods.client}</span></h3>
                <h3><span>游戏区服：王者荣耀 {$goods.client} {$goods.qu} </span></h3>
                <h3><span>要求时间：<i style="color: #ff5100">{$goods.ask_ok_time}</i> 小时</span></h3>
                <h3><span>安全保证金：<i style="color: #ff5100">{$goods.bond}</i> 元</span></h3>
                {if condition="$goods.heroes == 0"}
                {else}
                <h3><span>英雄数量：<i style="color: #ff5100">{$goods.heroes}</i> 个</span></h3>
                {/if}
                {if condition="$goods.mwgrade == 0"}
                {else}
                <h3><span>铭文等级：<i style="color: #ff5100">{$goods.mwgrade}</i> 级</span></h3>
                {/if}


                <h3><span>发单时间：{$goods.addtime}</span></h3>
                <h3><span>发单人：{$user.nickname}</span></h3>
            </div>
<!--            <div class="aui-arrow"></div>-->
        </div>
        <div class="divHeight"></div>
        <div class="aui-flex">
            <div class="aui-flex-box">
                <h6 class="b-line">代练要求</h6>
                <p>{$goods.dl_ask}</p>
            </div>
        </div>
        <div class="divHeight"></div>
        <div class="aui-flex">
            <div class="aui-flex-box">
                <h6 class="b-line">其他说明</h6>
                <p>{$goods.other}</p>
            </div>
        </div>
    </section>
    <footer class="aui-footer-button aui-footer-flex aui-footer-fixed">
        <div class="aui-footer-wrap">
            <span>分享</span>
        </div>
        <div class="aui-footer-wrap">
            <span>收藏</span>
        </div>
        <div class="aui-footer-group aui-footer-flex1">
            <div class="aui-footer-flex">
                <div class="aui-btn aui-btn-gray">
                    {if condition="$goods.status == 1"}
                        <h2 onclick='recorders()'>立即接单(需冻结{$goods.bond}元)</h2>
                    {elseif condition="$goods.status == 2"}
                        <h2>代 练 中</h2>
                    {/if}

                </div>
            </div>
        </div>
    </footer>

</section>

<script type="text/javascript">
    //信息修改
    function recorders(){
        var goodPrice = {$goods.dl_price};
        var bondMoney = {$goods.bond};
        var goodId = {$goods.id};
        var fa_uid = {$user.id};
        $.ajax({
            type: "POST",
            dataType: "json",
            url: "{:url('index/rec_orders')}?goodprice="+goodPrice+"&bondmoney="+bondMoney+"&goodid="+goodId+"&fa_uid="+fa_uid,
            data: {},
            success: function (result) {
                console.log(result)
                if (result.code == 0) {
                    new NoticeJs({
                        text: result.msg,
                        position: 'middleCenter',
                        animation: {
                            open: 'animated bounceInRight',
                            close: 'animated bounceOutLeft'
                        }
                    }).show();
                }else if (result.code == 1) {
                    new NoticeJs({
                        text: result.msg,
                        position: 'middleCenter',
                        animation: {
                            open: 'animated bounceInRight',
                            close: 'animated bounceOutLeft'
                        }
                    }).show();
                }else if(result.code == 2){
                    new NoticeJs({
                        text: result.msg,
                        position: 'middleCenter',
                        animation: {
                            open: 'animated bounceInRight',
                            close: 'animated bounceOutLeft'
                        }
                    }).show();
                    window.setTimeout("window.location='{:url(\'index/index\')}'",1500);
                }else if(result.code == 3){
                    new NoticeJs({
                        text: result.msg,
                        position: 'middleCenter',
                        animation: {
                            open: 'animated bounceInRight',
                            close: 'animated bounceOutLeft'
                        }
                    }).show();
                }
                ;

            },
            error : function() {
                new NoticeJs({
                    text: '异常',
                    position: 'middleCenter',
                }).show();
            }
        });
    }
</script>
<script type="text/javascript" src="__CDN__/assets/index/js/jquery.min.js"></script>
</body>
</html>
